'use client'

import {Card, Col, Row, Statistic} from 'antd'
import {DollarOutlined, InboxOutlined, ShoppingCartOutlined, TeamOutlined,} from '@ant-design/icons'

export default function HomePage() {
  return (
    <div style={{ padding: '24px' }}>
      <Row gutter={[16, 16]}>
        <Col span={6}>
          <Card>
            <Statistic
              title="今日销售额"
              value={112893}
              precision={2}
              valueStyle={{ color: '#3f8600' }}
              prefix={<DollarOutlined />}
              suffix="元"
            />
          </Card>
        </Col>
        <Col span={6}>
          <Card>
            <Statistic
              title="今日订单数"
              value={93}
              valueStyle={{ color: '#1890ff' }}
              prefix={<ShoppingCartOutlined />}
              suffix="单"
            />
          </Card>
        </Col>
        <Col span={6}>
          <Card>
            <Statistic
              title="库存预警"
              value={5}
              valueStyle={{ color: '#cf1322' }}
              prefix={<InboxOutlined />}
              suffix="项"
            />
          </Card>
        </Col>
        <Col span={6}>
          <Card>
            <Statistic
              title="活跃供应商"
              value={32}
              valueStyle={{ color: '#722ed1' }}
              prefix={<TeamOutlined />}
              suffix="个"
            />
          </Card>
        </Col>
      </Row>

      <Row gutter={[16, 16]} style={{ marginTop: '24px' }}>
        <Col span={12}>
          <Card title="待办事项">
            <p>1. 库存盘点 - 3月15日到期</p>
            <p>2. 供应商合同续签 - 3月20日到期</p>
            <p>3. 季度采购计划制定</p>
            <p>4. 新产品入库检查</p>
          </Card>
        </Col>
        <Col span={12}>
          <Card title="系统公告">
            <p>1. 系统将于本周日凌晨2点进行例行维护</p>
            <p>2. 新版移动端APP已发布</p>
            <p>3. 请及时更新库存预警设置</p>
            <p>4. 新增供应商评级功能</p>
          </Card>
        </Col>
      </Row>
    </div>
  )
} 